﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Microsoft_Phone_Controls_Maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps" xmlns:System_Device_Location="clr-namespace:System.Device.Location;assembly=System.Device" 
    x:Class="Nok_Air.BingMap.AirPortBingMap"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    
    >

<!--Sample code showing usage of ApplicationBar-->
<!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

	<Grid x:Name="bingMapLayoutRoot" Background="Black">

        <Microsoft_Phone_Controls_Maps:Map x:Name="myBingMap" 
                                           d:LayoutOverrides="Width, Height" 
                                           Grid.Row="0" 
                                           CredentialsProvider="AgWeQLMGf561w27kIyLHgUqnGpjCCXtY4bEqPCX__KK9AUn9_JGF13lQbZPJqPGR"
                                           ZoomBarVisibility="Collapsed" CopyrightVisibility="Collapsed" LogoVisibility="Collapsed" Margin="0">
            <Microsoft_Phone_Controls_Maps:Map.Mode>
                <Microsoft_Phone_Controls_Maps:AerialMode ShouldDisplayLabels="False" />
            </Microsoft_Phone_Controls_Maps:Map.Mode>
            <Microsoft_Phone_Controls_Maps:MapLayer x:Name="DirectionLayer"/>
            <Microsoft_Phone_Controls_Maps:MapLayer x:Name="PushpinLayer"/>

            <Button x:Name="ButtonZoomIn"
                        Style="{StaticResource ButtonZoomInStyle}"
                        HorizontalAlignment="Left" VerticalAlignment="Top"
                        Height="56" Width="56" Margin="8,300,0,0"
                        Click="ButtonZoomIn_Click" />

            <Button x:Name="ButtonZoomOut"
                        Style="{StaticResource ButtonZoomOutStyle}"
                        HorizontalAlignment="Left" VerticalAlignment="Top"
                        Height="56" Width="56" Margin="8,390,0,0"
                        Click="ButtonZoomOut_Click" />
        </Microsoft_Phone_Controls_Maps:Map>
        <ProgressBar x:Name="PBar" HorizontalAlignment="Center" Height="10" VerticalAlignment="Top" Width="480" IsIndeterminate="True" Canvas.ZIndex="100"/>
	</Grid>

    <!-- Application Bar -->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar x:Name="applicationBar"
							  IsVisible="True"
							  IsMenuEnabled="False"
							  Opacity="0.7">

            <shell:ApplicationBarIconButton Text="Me" IconUri="/Images/BingMapIcons/Location.png" Click="YourLocation_Click" />
            <shell:ApplicationBarIconButton Text="Airport" IconUri="/Images/BingMapIcons/Plane.png"  Click="AirportLocation_Click" />
            <shell:ApplicationBarIconButton Text="Direction" IconUri="/Images/BingMapIcons/Directions.png"  Click="ButtonDirections_Click" />
            <shell:ApplicationBarIconButton Text="Mode" IconUri="/Images/BingMapIcons/Mode.png"  Click="ButtonMode_Click" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
